package com.example.sneakerappserver.repository;

import com.example.sneakerappserver.pojo.Cart;
import com.example.sneakerappserver.pojo.Order;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface CartRepository extends CrudRepository<Cart,Long> {

    @Query(value = "SELECT cart_id FROM tb_cart WHERE user_id=:userId",nativeQuery = true)
    Long findCartByUserId(Long userId);


}
